package temperatures.conversor;

public class ConversorTemperaturas {	
	   private final double CERO_ABSOLUTO = -273.15;
	   
	   public double celsiusAFahrenheit(double celsius) 
					throws TemperaturaNoValidaException {
	      if (celsius < CERO_ABSOLUTO) 
				throw new TemperaturaNoValidaException();
	      return 9.0 / 5.0 * celsius + 32.0;
	   }
	   public double celsiusAReamur(double celsius) 
					throws TemperaturaNoValidaException {
	      if (celsius < CERO_ABSOLUTO) 
				throw new TemperaturaNoValidaException();
	      return 4.0 / 5.0 * celsius;
	   }
	}